package com.liuyi.netty.im.commons.codes.data.event.message.playload;

import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;

/**
 * 文本类型消息载体
 *
 * @author Mr.Fmy
 * @since 2021-12-08
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class PlayloadText extends Playload implements Serializable {

    private static final long serialVersionUID = -3642724005686780883L;


    public static final class PlayloadTextBuilder {
        private String text;

        private PlayloadTextBuilder() {
        }

        public static PlayloadTextBuilder aPlayloadText() {
            return new PlayloadTextBuilder();
        }

        public PlayloadTextBuilder text(String text) {
            this.text = text;
            return this;
        }

        public PlayloadText build() {
            PlayloadText playloadText = new PlayloadText();
            playloadText.setText(text);
            return playloadText;
        }
    }
}
